package org.cerberus.platform.components;

import org.cerberus.platform.component.annotations.Event;
import org.cerberus.platform.component.annotations.PComponent;

@PComponent(classID="PAction")
public abstract class PAction {

	private String title;
	private String description;
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public static PAction createEventAction(Object component, String eventName) {
		return null;
	}
	
	@Event
	public abstract Object perform() throws Throwable;
	
	public void updateState() {
		// defaultl implementation does nothing
	}
}
